#pragma once
#include <vector>
#include "file_op.h"
#include "skin_db_def.h"


class skin_db_builder
{
public:
	skin_db_builder(void);

	~skin_db_builder(void);

	bool build(LPCTSTR ptr_src_path, LPCTSTR ptr_dest_fn, LPCTSTR ptr_include_file, LPCTSTR ptr_exclude_folder);

protected:
	void clear();

	void traversal_folder(TCHAR * lpPath);

	void count_offset();

	bool write_index(LPCTSTR ptr_src_path, LPCTSTR ptr_dest_fn);

	bool write_file(LPCTSTR ptr_dest_fn);

	bool is_exclude_folder(LPCTSTR ptr_folder);

	bool is_include_file(LPCTSTR ptr_file);

	tstring get_file_type(LPCTSTR ptr_fn);

	bool parse_filter(LPCTSTR ptr_include_file, LPCTSTR ptr_exclude_folder);

protected:
	map_folder folder_map_;
	_UTIL::file_op dest_file_;
	std::vector<tstring> include_file_vec_;
	std::vector<tstring> exclude_folder_vec_;
};

